package com.weixing.mall.provider.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.weixing.mall.provider.model.domain.Activity;
import com.weixing.mall.provider.model.dto.act.ActivityDto;
import com.weixing.mall.provider.api.model.enums.ActTypeEnum;
import com.weixing.mall.provider.model.query.ActivityQuery;
import com.weixing.mall.provider.model.query.act.ActGoodsQuery;
import com.weixing.mall.provider.model.vo.act.ActivityFormVo;
import com.weixing.mall.provider.model.vo.act.ActivityVo;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 促销模块-活动表 服务类
 * </p>
 *
 * @author Small
 * @since 2019-11-16
 */
public interface IActivityService extends IService<Activity> {

    IPage findList(Page initMpPage, ActivityQuery query);
    IPage findFrontList(Page initMpPage, ActivityQuery query);
    void save(ActivityDto dto);

    List<ActivityFormVo> selectActivityFormVoList(ActTypeEnum actTypeEnum);

    /**
     * 查询可用的活动信息
     * @return
     */
    List<ActivityVo> selectAvailable();

    /**
     * 查询多久时间之内的活动列表
     * @return
     */
    List<ActivityVo> selectDataList(Date data,Integer flag);

    void refreshStockInRedis(Long actId);

    void delStockFromRedis(Long actId);

    List<ActivityVo> memnerList(ActivityQuery query);

    List<ActivityVo> selectinvitedList(Date dateTime);

    List<ActivityVo> dayList(Integer value);

    boolean checkActCode(String actCode);

    void checkIsDown(ActGoodsQuery query);
}
